package cn.iocoder.yudao.module.shop.controller.admin.order.vo;

import cn.iocoder.yudao.module.shop.controller.admin.base.member.MemberRespVO;
import cn.iocoder.yudao.module.shop.controller.admin.base.user.UserRespVO;
import cn.iocoder.yudao.module.shop.controller.admin.item.vo.ShopItemRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - 店内消耗订单 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ShopOrderRespVO extends ShopOrderBaseVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7705")
    private Long id;

    @Schema(description = "调理记录id", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long historyId;

    @Schema(description = "会员id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19052")
    private Long memberId;

    @Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4537")
    private Long userId;

    @Schema(description = "商品原价（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2266")
    private Integer totalPrice;

    @Schema(description = "商品原价（总）", requiredMode = Schema.RequiredMode.REQUIRED, example = "31454")
    private Integer payPrice;

    @Schema(description = "开始时间")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    private LocalDateTime endTime;

    @Schema(description = "是否余额支付", requiredMode = Schema.RequiredMode.REQUIRED, example = "5741")
    private Boolean walletCharge;

    @Schema(description = "次数支付", requiredMode = Schema.RequiredMode.REQUIRED, example = "5741")
    private Boolean timesCharge;

    @Schema(description = "是否已支付：[0:未支付 1:已经支付过]", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Boolean payStatus;

    @Schema(description = "是否打折核销", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    private Boolean discount;

    @Schema(description = "备注")
    private String comment;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime createTime;


    @Schema(description = "订单项目列表", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<ShopOrderItemVO> items;

    /**
     * 下单用户信息
     */
    @Schema(description = "订单灸师", requiredMode = Schema.RequiredMode.REQUIRED)
    private UserRespVO user;

    /**
     * 下单用户信息
     */
    @Schema(description = "订单用户", requiredMode = Schema.RequiredMode.REQUIRED)
    private MemberRespVO member;

    @Schema(description = "管理后台 - 店内订单详情")
    @Data
    public static class ShopOrderItemVO extends ShopOrderItemBaseVO {

        @Schema(description = "项目", requiredMode = Schema.RequiredMode.REQUIRED)
        private ShopItemRespVO shopItem;
    }
}
